New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TopoJSON support #1284
Comments
Some of @sgillies recent work with converting TopoJSON to GeoJSON with Python will likely help. |
+1! I'm guessing since Leaflet already supports GeoJSON, the TopoJSON client library, topojson.js should be usable out of the box. In particular, the topojson.object method for converting a TopoJSON object back to a GeoJSON object. Of course it’s always easier if Leaflet can take care of that conversion for you. The TopoJSON client library also provides a mesh algorithm which is useful for computing boundaries on the fly, such as inter-state boundaries while excluding coastlines. That’s definitely not required to use TopoJSON, but it is quite useful in a number of mapping applications. Let me know if I can offer any further advice. |
We definitely need a plugin for this if we don't put it in core. Looks cool! |
Yep, seems easy enough. http://bl.ocks.org/4554134 Any strong feelings on core or plugin? |
Feels like a plugin to me |
I'm new to these parts of Github, but if it has the potential to improve performance as dramatically as suggested then it should be part of the core lib. |
👍 plugin. If it becomes a 'must-have' it should be core, but TopoJSON is a niche at this point and is a significant amount of code. |
The minified topojson.object method (which is all you'd need at minimum to convert TopoJSON to GeoJSON) is only 993 bytes, so that’s not a lot of code. But I have no opinion on whether or not to plugin. |
I think it's so easy to use the topojson library out of the box with Leaflet that this can be considered done. |
Lets discuss @mbostock's TopoJSON support for Leaflet (either as a plugin or in the core) here. cc @danzel @JasonSanford
The text was updated successfully, but these errors were encountered: